// pages/orderwrite/orderwrite.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
  
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this;
    var url = app.getApi("api_departure");//app.getApi("api_order_findpreparedata")
    /*var reqParams = {
      "scheduleid": token,
      "userid": 2,
      "netname": 1,
      "netaddress": 10,
      "callback": ''
    }*/
    var reqParams = {
      ismock: 0,
      word:"长春市",
      page:0,
      rowCount:1
    }
    wx.request({
      url: url,
      data: reqParams,
      method: "GET",
      success: function (res) {
        if (res.statusCode == 200) {
          that.setData({
            order: res.data.orderinfos
          })
        }
        console.log(res)
      }
    })
  },
  typeHandler(e) {
    const { type } = e.currentTarget.dataset
    wx.navigateTo({
      url: '../orderwrite-ckxx/orderwrite-ckxx?type=' + type,
    })
  },
  tijiaodingdan(e) {
    const { type } = e.currentTarget.dataset
    wx.navigateTo({
      url: '../user-dfk-pay/user-dfk-pay?type=' + type,
    })
  }

})